import Vue from 'vue'
import Vuex from 'vuex'
import user from 'pages/user.js'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
		list: [],
		accountIdentification: 0,
		userId: ''
	},
    mutations: {
		intList(state) {
			// console.log(user.user.users);
			state.listAll = user.user.users;
		},
		intList2(state,list) {
			state.list = list;
			uni.setStorage({
				key: 'userInfo',
				data: state.list,
				success: function (res) {
				   console.log('success');
				}
			})
		},
		setToken(state, value) {
			state.userId = value;
		}
	},
    actions: {
	
	}
})

export default store